package com.example.demo.NiuKe.v13;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
        while ((str = br.readLine())!= null){
            Integer i = Integer.valueOf(str);
            String s = Integer.toBinaryString(i);
            int count =0;
            String s1="";
            for (int j =0;j<s.length();j++){
                String s2 = s1+s.charAt(j);
                if(s2.equals("1")){
                    count++;
                }
            }
            System.out.println(count);
        }
    }
}
